<template>
  <div class="alert">
    <div>我是标题</div>
  </div>
</template>

<script>
export default {
  props: ['title', 'duraction'],
  mounted() {
    console.log(this.title, this.duraction)
  }
}
</script>

<style scoped>
.alert{
  border: 10px solid #ccc;
  width: 500px;
  height: 300px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
</style>